import { createSlice } from "@reduxjs/toolkit";


const bookSlice = createSlice({
    name: 'book-slice',
    initialState: {
        name: '资治通鉴',
        country: 'china'
    },
    reducers: {
        setName(state, action) {
            state.name = action.payload
        },
        setCountry(state, action) {
            state.country = action.payload
        }
    }
})

export default bookSlice